PUBLIC = ../../public
SRC = src
BIN = bin
GLOBAL_BIN = ../../bin
CFLAGS = -Wall -pedantic -ansi -Werror
CC = gcc
LIB_TOOL = ar
LIB_FLAGS = -r -s
COMPILE_FLAG = -c

all: MPoolTestrelease 

MPoolTestdebug: CFLAGS+=-g 
MPoolTestdebug: BIN=bin/debug
MPoolTestdebug: GLOBAL_BIN=../../bin/debug
MPoolTestdebug: $(BIN)/MPoolTest clean
	@echo "**********************************************************"
	@echo "*							*"
	@echo "*		SUCCEFULY FINISHED			*"
	@echo "*							*"
	@echo "**********************************************************"


MPoolTestrelease: CFLAGS+=-g -DNDEBUG
MPoolTestrelease: BIN=bin/release
MPoolTestrelease: GLOBAL_BIN=../../bin/release
MPoolTestrelease: $(BIN)/MPoolTest clean
	@echo "**********************************************************"
	@echo "*							*"
	@echo "*		SUCCEFULY FINISHED			*"
	@echo "*							*"
	@echo "**********************************************************"

$(BIN)/MPoolTest: MPoolTest.o
	$(CC) $(CFLAGS) MPoolTest.o -L$(GLOBAL_BIN) -lMPool -o $(BIN)/MPoolTest

MPoolTest.o: $(PUBLIC)/MPool.h MPoolTest.c
	$(CC) $(COMPILE_FLAG) $(CFLAGS) -I$(PUBLIC) MPoolTest.c -o MPoolTest.o

clean: 
	rm *.o
